import SelectExpression from "./SelectExpression";

/** 增删改查的接口 */
interface CrudExpression extends SelectExpression {
    /** 新增 */
    insert(data: Array<Record<string, string | number | bigint | boolean>> | Record<string, string | number | bigint | boolean>): Promise<number>

    /** 返回自增id */
    insertId(data: Record<string, string | number | bigint | boolean>): Promise<number>

    /** 修改 */
    update(data: Array<Record<string, string | number | bigint | boolean>> | Record<string, string | number | bigint | boolean>): Promise<number>

    /** 删除 */
    delete(check: boolean | string | Record<string, string | number | bigint | boolean>, value?: string | number | bigint | boolean): Promise<number>

}

export = CrudExpression;